home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 251_01 / osample.adv < prev    next >
Text File  |  1987-10-27  |  4KB  |  149 lines

  1. ; SAMPLE.ADV
  2. ;
  3. ; This is a VERY simple sample adventure that uses the "BASIC.ADI" simple
  4. ; runtime support code.  It isn't interesting to play, but does illustrate
  5. ; most of the features of the adventure authoring system.  Try compiling
  6. ; it using the command:
  7. ;
  8. ;        A>ADVCOM SAMPLE
  9. ;
  10. ; When the compile has finished, run the adventure using the command:
  11. ;
  12. ;        A>ADVINT SAMPLE
  13. ;
  14. ; You should then see the initial welcome message and a description of
  15. ; your initial location.  You can use the direction names to move from
  16. ; one location to the next (or the abreviations N,S,E,W).  You should try
  17. ; manipulating objects using TAKE and DROP.  You can manipulate more than
  18. ; one at a time by using the conjunction AND.  You can also GIVE an object
  19. ; to another creature like the DOG or CAT.  You can instruct another
  20. ; creature to perform an action like:
  21. ;
  22. ;       CAT, GIVE THE DOG THE KEY
  23. ;
  24. ; You can also experiment with using adjectives to distinguish between
  25. ; objects (there is more than one KEY in this adventure).
  26.  
  27. (adventure sample 1)
  28.  
  29. (define welcome "Welcome to the sample adventure.\n")
  30.  
  31. @objects.adi
  32.  
  33. (actor adventurer
  34.   (noun me)
  35.   (property
  36.     initial-location livingroom))
  37.  
  38. (actor dog
  39.   (noun dog)
  40.   (adjective small)
  41.   (property
  42.     description "There is a small dog here."
  43.     short-description "a small dog"
  44.     initial-location kitchen))
  45.  
  46. (actor cat
  47.   (noun cat)
  48.   (property
  49.     description "There is a cat here."
  50.     short-description "a cat"
  51.     initial-location kitchen))
  52.  
  53. (location storage-room
  54.   (property
  55.     description "You are in a small storage room with many empty shelves.
  56.                  The only exit is a door to the west."
  57.     short-description "You are in the storage room."
  58.     west hallway)
  59.   (method (leave obj dir)
  60.     (if (send obj carrying? rusty-key)
  61.       (send-super leave obj dir)
  62.       (print "You seem to be missing something!\n"))))
  63.  
  64. (location hallway
  65.   (property
  66.     description "You are in a long narrow hallway. There is a door to the
  67.                  east into a small dark room.  There are also exits on both
  68.                  the north and south ends of the hall."
  69.     short-description "You are in the hallway."
  70.     east storage-room
  71.     north kitchen
  72.     south livingroom))
  73.  
  74. (location kitchen
  75.   (property
  76.     description "This is a rather dusty kitchen.  There is a hallway to the
  77.                  south and a pantry to the west."
  78.     short-description "You are in the kitchen."
  79.     south hallway
  80.     west pantry))
  81.  
  82. (location pantry
  83.   (property
  84.     description "This is the kitchen pantry.  The kitchen is through a 
  85.                  doorway to the east."
  86.     short-description "You are in the pantry."
  87.     east kitchen))
  88.  
  89. (location livingroom
  90.   (property
  91.     description "This appears to be the livingroom.  There is a hallway to
  92.                  the north and a closet to the west."
  93.     short-description "You are in the livingroom."
  94.     north hallway
  95.     west closet
  96.     south front-door-1))
  97.  
  98. (location outside
  99.   (property
  100.     description "You are outside a small house.  The front door is to the
  101.                  north."
  102.     short-description "You are outside."
  103.     north front-door-2))
  104.  
  105. (portal front-door
  106.   (noun door)
  107.   (adjective front)
  108.   (class-property
  109.     short-description "front door"
  110.     closed t
  111.     locked t
  112.     key rusty-key))
  113.  
  114. (front-door front-door-1
  115.   (property
  116.     initial-location livingroom
  117.     other-side front-door-2))
  118.  
  119. (front-door front-door-2
  120.   (property
  121.     initial-location outside
  122.     other-side front-door-1))
  123.  
  124. (location closet
  125.   (property
  126.     description "This is the livingroom closet.  The livingroom is through
  127.                  a doorway to the east."
  128.     short-description "You are in the closet."
  129.     east livingroom))
  130.  
  131. (thing rusty-key
  132.   (noun key)
  133.   (adjective rusty)
  134.   (property
  135.     description "There is a rusty key here."
  136.     short-description "a rusty key"
  137.     initial-location storage-room))
  138.  
  139. (thing silver-key
  140.   (noun key)
  141.   (adjective small silver)
  142.   (property
  143.     description "There is a small silver key here."
  144.     short-description "a small silver key"
  145.     initial-location closet))
  146.  
  147.                                                   
  148.                                                         
  149.